#ifndef AER_INTERSECTION_HPP_
#define AER_INTERSECTION_HPP_

#include "aerDefs.hpp"
#include "aerBoundingBox.hpp"
#include "view/aerFrustum.hpp"


namespace aer {

enum IntersectionResult
{
  OUTSIDE,
  INSIDE,
  INTERSECTING
};


/// Plane against AABB
IntersectionResult intersectPlaneAABB(const Vector4 &plane, 
                                      const BoundingBox &aabb);

/// Frustum against AABB
IntersectionResult intersectFrustumAABB(const Vector4 planes[Frustum::kNumPlane], 
                                        const BoundingBox &aabb);

/// Frustum against AABB with Plane-Coherency test
IntersectionResult intersectFrustumAABB(const Vector4 planes[Frustum::kNumPlane], 
                                        const BoundingBox &aabb, 
                                        U8 *pLastId);

} // aer

#endif // AER_INTERSECTION_HPP_
